package com.itcast.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itcast.pojo.User;

import javax.xml.bind.ValidationException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ${author}
 * @since 2020-06-19
 */
public interface Userservice extends IService<User> {
    /**
     * 注册
     */
    boolean addUser(User user);

    /**
     * 登录
     * @return
     */
    User login(User user);

    /**
     * 修改密码
     */
    int updatePwd(String pwd,String phone);

    int updateAvatar(Integer userId,String imgUrl) throws ValidationException;

    /**
     * 用户登录
     * @param phone
     * @param password
     * @return
     */
    User userLogin(String phone, String password);

    /**
     * 注册
     * @param phone
     * @param password
     * @return
     */
    int register(String phone, String password);

    /**
     * 修改用户信息
     * @param user
     * @return
     */
    int updateUserInfo(User user);

    /**
     * 修改密码
     * @param uid
     * @param password
     * @return
     */
    int updateUserPassword(String uid, String password);
}
